<template>
  <div class="customServe">
    <!-- 搜索表单 -->
    <div class="topSearchBox">
      <el-form ref="searchForm" :model="searchForm" :rules="feeDialogRules" label-width="90px" :inline="true" size="mini">
        <el-row>
          <el-col :span="4.5">
            <el-form-item label="英文船名：" prop="enName">
              <el-input v-model="searchForm.enName" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4.5">
            <el-form-item label="航次：" prop="route">
              <el-input v-model="searchForm.route" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4.5">
            <el-form-item label="流水号：" prop="waterNum">
              <el-input v-model="searchForm.waterNum" clearable></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row class="searchDate">
          <el-col :span="4.5">
            <el-form-item label="状态：" prop="statu">
              <el-select v-model="searchForm.statu" filterable clearable>
                <el-option
                  v-for="item in bdcstatuList"
                  :key="item.rvLowValue"
                  :label="item.rvCmeaning"
                  :value="item.rvLowValue">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4.5">
            <el-form-item label="起始时间：" prop="startDay">
              <el-date-picker v-model="searchForm.startDay" type="date" placeholder="选择日期时间" value-format="yyyy-MM-dd" clearable></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="4.5">
            <el-form-item label="结束时间：" prop="endDay">
              <el-date-picker v-model="searchForm.endDay" type="date" placeholder="选择日期时间" value-format="yyyy-MM-dd" clearable></el-date-picker>
            </el-form-item>
          </el-col>
          <el-form-item>
            <el-button type="primary"  @click="searchBtn">查询</el-button>
          </el-form-item>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="tableBox">
      <div class="tableTitle">托单列表</div>
      <!-- 按钮组 -->
      <div class="btnBox">
        <el-button type="primary" size="mini" plain @click="inputOrder">输单</el-button>
        <el-button type="primary" size="mini" plain @click="successInput">输单审核/撤销</el-button>
        <el-button type="primary" size="mini" plain @click="startCustom">开始申报/撤销</el-button>
        <el-button type="primary" size="mini" plain @click="happenSearch">发生查验/撤销</el-button>
        <el-button type="primary" size="mini" plain @click="successSearch">查验完成/撤销</el-button>
        <el-button type="primary" size="mini" plain @click="successCustom">报关完成/撤销</el-button>
        <el-button type="primary" size="mini" plain @click="successRelease">放行确认/撤销</el-button>
        <!-- <el-button type="primary" size="mini" plain @click="document" disabled>生成单证</el-button>
        <el-button type="primary" size="mini" plain @click="uploadFile" disabled>上传附件</el-button>
        <el-button type="primary" size="mini" plain @click="downFile" disabled>下载附件</el-button> -->
      </div>
      <!-- 托单列表 表格 -->
      <el-table :data="billTableData" border :height="billTableHeight" :header-cell-style="{ textAlign: 'center' }" highlight-current-row @row-click="getCurrent">
        <el-table-column type="index" align="center" label=" " width="50"></el-table-column>
        <el-table-column prop="bdcCode" label="流水号" width="150px" show-overflow-tooltip sortable></el-table-column>
        <el-table-column prop="bdcStatusName" label="状态" align="center" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="tayStates" label="口岸" show-overflow-tooltip  sortable >宁波港</el-table-column>
        <el-table-column prop="bdcShipper" label="船公司" show-overflow-tooltip  sortable></el-table-column>
        <el-table-column prop="bdcVesselname" label="英文船名" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="bdcVoyage" label="航次" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="bdcBillno" label="提单号" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="bdcDestport" label="目的港" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="bdcGoodsnumbers" label="件数" align="center" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="bdcGoodsweight" label="毛重" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="bdcGoodsvolume" label="体积" align="center" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="bdcContractno" label="合同号" align="center" show-overflow-tooltip sortable ></el-table-column>
        <el-table-column prop="tayOprtdate" label="货代" show-overflow-tooltip sortable >上海文景信息科技有限公司</el-table-column>
        <el-table-column prop="tayOprtdate" label="附件" show-overflow-tooltip sortable >无</el-table-column>
        <el-table-column prop="bdcRemark" label="备注" show-overflow-tooltip sortable ></el-table-column>
      </el-table>
      <!-- 分页 -->
      <div class="block">
        <el-pagination
          ref="pagination"
          small
          background
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="Pagination.currentPage"
          :page-sizes="Pagination.pageSizeList"
          :page-size="Pagination.pageSize"
          :layout="Pagination.layout"
          :total="Pagination.total">
        </el-pagination>
      </div>
    </div>

    <!-- 输单弹窗 -->
    <el-dialog title="单证信息" :visible.sync="documentInfoDialog" width="80%" :close-on-click-modal='false' v-el-drag-dialog>
      <div class="documentInfoBox">
        <div class="documentTop">
          <el-tabs type="border-card">
            <el-tab-pane label="报关信息F1">
              <div class="infoF1Title">申报口岸：</div>
              <div class="infoForm">
                <!-- 左侧 -->
                <div class="infoFormLeft">
                  <!-- 申报口岸 表单 -->
                  <el-form ref="portForm" :model="portForm" label-width="110px" :inline="true" size="mini">
                    <!-- 第一行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="类型：" prop="bdcIetype">
                          <el-select v-model="portForm.bdcIetype" filterable clearable>
                            <el-option
                              v-for="item in LXList"
                              :key="item.value"
                              :label="item.label"
                              :value="item.value">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="申报海关：" prop="bdcDeclareLoc">
                          <el-select v-model="portForm.bdcDeclareLoc" filterable clearable>
                            <el-option
                              v-for="item in statusList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第二行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="统一编号：" prop="bdcNumbers">
                          <el-input v-model="portForm.bdcNumbers" clearable disabled></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="流水号：" prop="bdcCode">
                          <el-input v-model="portForm.bdcCode" clearable disabled></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="海关编号：" prop="bdcCustomsnumber">
                          <el-input v-model="portForm.bdcCustomsnumber" clearable disabled></el-input>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第三行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="出口口岸：" prop="bdcExportloc">
                          <el-select v-model="portForm.bdcExportloc" filterable clearable>
                            <el-option
                              v-for="item in statusList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="备案号：" prop="bdcEnrolNo">
                          <el-input v-model="portForm.bdcEnrolNo" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="合同号：" prop="bdcContractno">
                          <el-input v-model="portForm.bdcContractno" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第四行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="出口日期：" prop="bdcExportDate">
                          <el-date-picker v-model="portForm.bdcExportDate" type="date" placeholder="选择日期时间" value-format="yyyy-MM-dd" clearable></el-date-picker>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="申报日期：" prop="bdcDeclareDate">
                          <el-date-picker v-model="portForm.bdcDeclareDate" type="date" placeholder="选择日期时间" value-format="yyyy-MM-dd" clearable></el-date-picker>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第五行 -->
                    <el-row>
                      <el-col :span="16">
                        <el-form-item label="经营单位：" prop="bdcBuscompanyCode">
                          <el-input v-model="portForm.bdcBuscompanyCode" clearable ></el-input>
                        </el-form-item>
                        <el-form-item prop="bdcBuscompany">
                          <el-input v-model="portForm.bdcBuscompany" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="运输方式：" prop="bdcTransmode">
                          <el-select v-model="portForm.bdcTransmode" filterable clearable>
                            <el-option
                               v-for="item in YSFSList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第六行 -->
                    <el-row>
                      <el-col :span="16">
                        <el-form-item label="发货单位：" prop="bdcProduccompanyCode">
                          <el-input v-model="portForm.bdcProduccompanyCode" clearable ></el-input>
                        </el-form-item>
                        <el-form-item prop="bdcProduccompany">
                          <el-input v-model="portForm.bdcProduccompany" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="运输工具名称：" prop="bdcVesselname">
                          <el-input v-model="portForm.bdcVesselname" clearable></el-input>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第七行 -->
                    <el-row>
                      <el-col :span="16">
                        <el-form-item label="申报单位：" prop="bdcDeccompanyCode">
                          <el-input v-model="portForm.bdcDeccompanyCode" clearable ></el-input>
                        </el-form-item>
                        <el-form-item prop="bdcDeccompany">
                          <el-input v-model="portForm.bdcDeccompany" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="航次号：" prop="bdcVoyage">
                          <el-input v-model="portForm.bdcVoyage" clearable></el-input>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第八行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="提运单号：" prop="bdcBillno">
                          <el-input v-model="portForm.bdcBillno" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="贸易方式：" prop="bdcTradeMode">
                          <el-select v-model="portForm.bdcTradeMode" filterable clearable>
                            <el-option
                               v-for="item in MYFSList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="征免性质：" prop="bdcCutmode">
                          <el-select v-model="portForm.bdcCutmode" filterable clearable>
                            <el-option
                              v-for="item in ZMXZList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第九行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="纳税单位：" prop="bdcTaxcorpType">
                          <el-input v-model="portForm.bdcTaxcorpType" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="许可证号：" prop="bdcLicenseNo">
                          <el-input v-model="portForm.bdcLicenseNo" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第十行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="抵运国(地区)：" prop="bdcArrcountry">
                          <el-select v-model="portForm.bdcArrcountry" filterable clearable>
                            <el-option
                             v-for="item in DYGList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="指运港：" prop="bdcArrport">
                          <el-input v-model="portForm.bdcArrport" clearable ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="境内货源地：" prop="bdcGoodssource">
                          <el-select v-model="portForm.bdcGoodssource" filterable clearable>
                            <el-option
                              v-for="item in JNHYDList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第十一行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="贸易国：" prop="bdcTradcountry">
                          <el-select v-model="portForm.bdcTradcountry" filterable clearable>
                            <el-option
                              v-for="item in DYGList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="成交方式：" prop="bdcTransacmode">
                          <el-select v-model="portForm.bdcTransacmode" filterable clearable>
                            <el-option
                              v-for="item in CJFSList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第十二行 -->
                    <el-row>
                      <el-col :span="12" class="thirdChange">
                        <el-form-item label="运费：" prop="bdcFreightMarkChn">
                          <el-select v-model="portForm.bdcFreightMarkChn" filterable clearable>
                            <el-option
                             v-for="item in FLList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                        <el-form-item prop="bdcFreightRate">
                          <el-input v-model="portForm.bdcFreightRate" clearable></el-input>
                        </el-form-item>
                        <el-form-item prop="bdcFreightCurrencyChn">
                          <el-select v-model="portForm.bdcFreightCurrencyChn" filterable clearable>
                            <el-option
                              v-for="item in FBList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="12" class="thirdChange">
                        <el-form-item label="保费：" prop="bdcInsuranceMarkChn">
                          <el-select v-model="portForm.bdcInsuranceMarkChn" filterable clearable>
                            <el-option
                              v-for="item in FLList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                        <el-form-item prop="bdcInsuranceRate">
                          <el-input v-model="portForm.bdcInsuranceRate" clearable></el-input>
                        </el-form-item>
                        <el-form-item prop="bdcInsuranceCurrencyChn">
                          <el-select v-model="portForm.bdcInsuranceCurrencyChn" filterable clearable>
                            <el-option
                              v-for="item in FBList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第十三行 -->
                    <el-row>
                      <el-col :span="12" class="thirdChange">
                        <el-form-item label="杂费：" prop="bdcExtrasMarkChn">
                          <el-select v-model="portForm.bdcExtrasMarkChn" filterable clearable>
                            <el-option
                             v-for="item in FLList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                        <el-form-item prop="bdcExtrasRate">
                          <el-input v-model="portForm.bdcExtrasRate" clearable></el-input>
                        </el-form-item>
                        <el-form-item prop="bdcExtrasCurrencyChn">
                          <el-select v-model="portForm.bdcExtrasCurrencyChn" filterable clearable>
                            <el-option
                              v-for="item in FBList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="12">
                        <el-form-item label="包装种类：" prop="bdcPacktype">
                          <el-select v-model="portForm.bdcPacktype" filterable clearable>
                            <el-option
                              v-for="item in BZZLList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第十四行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="件数：" prop="bdcGoodsnumbers">
                          <el-input v-model="portForm.bdcGoodsnumbers" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="毛重(KG)：" prop="bdcGoodsweight">
                          <el-input v-model="portForm.bdcGoodsweight" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="净重(KG)：" prop="bdcNetWeight">
                          <el-input v-model="portForm.bdcNetWeight" clearable></el-input>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <!-- 第十五行 -->
                    <el-row>
                      <el-col :span="8">
                        <el-form-item label="报关单类型：" prop="bdcEntrytype">
                          <el-select v-model="portForm.bdcEntrytype" filterable clearable>
                            <el-option
                              v-for="item in BGDLXList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                            </el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="备注：" prop="bdcRemark">
                          <el-input v-model="portForm.bdcRemark" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-form-item prop="a43">
                        <el-checkbox v-model="portForm.bdcClearance">担保验放</el-checkbox>
                      </el-form-item>
                    </el-row>
                  </el-form>
                  <!-- 删除 按钮 -->
                  <div class="portBtn">
                    <el-button type="danger" size="mini" plain @click="leftDel">删除</el-button>
                  </div>
                  <!-- 商品 表格 -->
                  <el-table :data="goodsTableData" border :height="goodsTableHeight" :header-cell-style="{ textAlign: 'center' }" highlight-current-row>
                    <el-table-column type="index" align="center" label=" " width="50"></el-table-column>
                    <el-table-column prop="tayNo" label="商品编号" show-overflow-tooltip sortable></el-table-column>
                    <el-table-column prop="tayIeflag" label="目的地名称" show-overflow-tooltip sortable ></el-table-column>
                    <el-table-column prop="tayStates" label="成交数量" align="center" show-overflow-tooltip  sortable ></el-table-column>
                    <el-table-column prop="tdrName" label="成交单位名称" width="130" show-overflow-tooltip  sortable></el-table-column>
                    <el-table-column prop="tayWrkdate" label="成交单价" align="center" show-overflow-tooltip sortable ></el-table-column>
                    <el-table-column prop="tayExpensePayable" label="金额" align="center" show-overflow-tooltip sortable ></el-table-column>
                    <el-table-column prop="tayOprtdate" label="币制" show-overflow-tooltip sortable ></el-table-column>
                    <el-table-column prop="tayOprtdate" label="征免" show-overflow-tooltip sortable ></el-table-column>
                  </el-table>
                  <!-- 商品 表单 -->
                  <div class="goodsFormBox">
                    <el-form ref="goodsForm" :model="goodsForm" label-width="100px" :inline="true" size="mini">
                      <!-- 第一行 -->
                      <el-row>
                        <el-col :span="6">
                          <el-form-item label="商品序号：" prop="goodsOrderNum1">
                            <el-input v-model="goodsForm.goodsOrderNum1" clearable disabled></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="备案序号：" prop="goodsOrderNum2">
                            <el-input v-model="goodsForm.goodsOrderNum2" clearable disabled></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="商品编号：" prop="goodsOrderNum3">
                            <el-input v-model="goodsForm.goodsOrderNum3" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="附加编号：" prop="goodsOrderNum4">
                            <el-input v-model="goodsForm.goodsOrderNum4" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </el-row>
                      <!-- 第二行 -->
                      <el-row>
                        <el-col :span="12">
                          <el-form-item label="规格型号：" prop="goodsOrderNum5" class="secondWidth">
                            <el-input v-model="goodsForm.goodsOrderNum5" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="12">
                          <el-form-item label="商品名称：" prop="goodsOrderNum6" class="secondWidth">
                            <el-input v-model="goodsForm.goodsOrderNum6" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </el-row>
                      <!-- 第三行 -->
                      <el-row>
                        <el-col :span="6">
                          <el-form-item label="成交数量：" prop="goodsOrderNum7">
                            <el-input v-model="goodsForm.goodsOrderNum7" clearable ></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="成交单位：" prop="goodsOrderNum8">
                            <el-select v-model="goodsForm.goodsOrderNum8" filterable clearable>
                              <el-option
                               v-for="item in CJDWList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="成交单价：" prop="goodsOrderNum9">
                            <el-input v-model="goodsForm.goodsOrderNum9" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="成交总价：" prop="goodsOrderNum10">
                            <el-input v-model="goodsForm.goodsOrderNum10" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </el-row>
                      <!-- 第四行 -->
                      <el-row>
                        <el-col :span="6">
                          <el-form-item label="法定数量：" prop="goodsOrderNum11">
                            <el-input v-model="goodsForm.goodsOrderNum11" clearable ></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="法定单位：" prop="goodsOrderNum12">
                            <el-select v-model="goodsForm.goodsOrderNum12" filterable clearable disabled>
                              <el-option
                                v-for="item in statusList"
                                :key="item.FSCJ"
                                :label="item.rvCmeaning"
                                :value="item.FSCJ">
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="币制：" prop="goodsOrderNum13">
                            <el-select v-model="goodsForm.goodsOrderNum13" filterable clearable>
                              <el-option
                                v-for="item in FBList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="版本号：" prop="goodsOrderNum14">
                            <el-input v-model="goodsForm.goodsOrderNum14" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </el-row>
                      <!-- 第五行 -->
                      <el-row>
                        <el-col :span="6">
                          <el-form-item label="第二数量：" prop="goodsOrderNum15">
                            <el-input v-model="goodsForm.goodsOrderNum15" clearable ></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="第二单位：" prop="goodsOrderNum16">
                            <el-select v-model="goodsForm.goodsOrderNum16" filterable clearable disabled>
                              <el-option
                                v-for="item in statusList"
                                :key="item.FSCJ"
                                :label="item.rvCmeaning"
                                :value="item.FSCJ">
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="原产国：" prop="goodsOrderNum17">
                            <el-select v-model="goodsForm.goodsOrderNum17" filterable clearable>
                              <el-option
                                v-for="item in DYGList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="生产厂家：" prop="goodsOrderNum18">
                            <el-input v-model="goodsForm.goodsOrderNum18" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </el-row>
                      <!-- 第六行 -->
                      <el-row>
                        <el-col :span="6">
                          <el-form-item label="货号：" prop="goodsOrderNum19">
                            <el-input v-model="goodsForm.goodsOrderNum19" clearable disabled></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="目的地：" prop="goodsOrderNum20">
                            <el-select v-model="goodsForm.goodsOrderNum20" filterable clearable>
                              <el-option
                                v-for="item in DYGList"
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="征免：" prop="goodsOrderNum21">
                            <el-select v-model="goodsForm.goodsOrderNum21" filterable clearable>
                              <el-option
                                 v-for="item in ZMList "
                              :key="item.code"
                              :label="item.chnDesc"
                              :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="工缴费：" prop="goodsOrderNum22">
                            <el-input v-model="goodsForm.goodsOrderNum22" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </el-form>
                  </div>
                  <!-- 保存  按钮 -->
                  <div class="saveBtnBox">
                    <el-button type="primary" size="mini" @click="inputOrderSave">保存</el-button>
                  </div>
                </div>
                <!-- 右侧 -->
                <div class="infoFormRight">
                  <!-- 删除 按钮 -->
                  <div class="rightDelBtnBox">
                    <el-button type="danger" size="mini" plain @click="leftDel">删除</el-button>
                  </div>
                  <!-- 集装箱 表格 -->
                  <el-table :data="boxTableData" border :height="boxTableHeight" :header-cell-style="{ textAlign: 'center' }" highlight-current-row>
                    <el-table-column type="index" align="center" label=" " width="30"></el-table-column>
                    <el-table-column prop="tayNo" label="集装箱号" show-overflow-tooltip sortable></el-table-column>
                    <el-table-column prop="tayIeflag" label="箱型规格" show-overflow-tooltip sortable ></el-table-column>
                    <el-table-column prop="tayStates" label="自重(KG)" show-overflow-tooltip  sortable ></el-table-column>
                  </el-table>
                  <!-- 集装箱 表单 -->
                  <div class="boxFormBox">
                    <el-form ref="boxForm" :model="boxForm" label-width="150px" :inline="true" size="mini">
                      <el-row>
                        <el-form-item label="集装箱号：" prop="boxNum">
                          <el-input v-model="boxForm.boxNum" clearable></el-input>
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item label="集装箱规格：" prop="boxStyle">
                          <el-input v-model="boxForm.boxStyle" clearable></el-input>
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item label="集装箱自重(KG)：" prop="boxWeight">
                          <el-input v-model="boxForm.boxWeight" clearable></el-input>
                        </el-form-item>
                      </el-row>
                    </el-form>
                  </div>
                  <!-- 删除 按钮 -->
                  <div class="rightDelBtnBox">
                    <el-button type="danger" size="mini" plain @click="leftDel">删除</el-button>
                  </div>
                  <!-- 单证 表格 -->
                  <el-table :data="documentTableData" border :height="documentTableHeight" :header-cell-style="{ textAlign: 'center' }" highlight-current-row>
                    <el-table-column type="index" align="center" label=" " width="30"></el-table-column>
                    <el-table-column prop="tayNo" label="单证代码" show-overflow-tooltip sortable></el-table-column>
                    <el-table-column prop="tayIeflag" label="单证编号" show-overflow-tooltip sortable ></el-table-column>
                  </el-table>
                  <!-- 单证 表单 -->
                  <div class="documentFormBox">
                    <el-form ref="documentForm" :model="documentForm" label-width="150px" :inline="true" size="mini">
                      <el-row>
                        <el-form-item label="随附单证代码：" prop="documentCode">
                          <el-input v-model="documentForm.documentCode" clearable></el-input>
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item label="随附单证编号：" prop="documentNum">
                          <el-input v-model="documentForm.documentNum" clearable></el-input>
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item label="关联报关单：" prop="bdcRelentryNo">
                          <el-input v-model="documentForm.bdcRelentryNo" clearable></el-input>
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item label="关联备案：" prop="bdcRelenrolNo">
                          <el-input v-model="documentForm.bdcRelenrolNo" clearable></el-input>
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item label="监管仓号：	" prop="bdcWarehouseNo">
                          <el-input v-model="documentForm.bdcWarehouseNo" clearable></el-input>
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item label="货场代码：	" prop="bdcCyNo">
                          <el-input v-model="documentForm.bdcCyNo" clearable></el-input>
                        </el-form-item>
                      </el-row>
                    </el-form>
                  </div>
                </div>
              </div>
            </el-tab-pane>
            <el-tab-pane label="报关其他信息F2">
              <el-form ref="otherInfoForm" :model="otherInfoForm" :inline="true" size="mini">
                <!-- 第一行 -->
                <el-row class="centerP">
                  <el-col :span="5">
                    <p>发票号码(*)</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                  <el-col :span="1"><div>&nbsp;</div></el-col>
                  <el-col :span="5">
                    <p>件数</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                  <el-col :span="1"><div>&nbsp;</div></el-col>
                  <el-col :span="5">
                    <p>总金额</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                  <el-col :span="1"><div>&nbsp;</div></el-col>
                  <el-col :span="5">
                    <p>信用证号</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                </el-row>
                <div class="itemInfo">经营单位信息(*)</div>
                <!-- 第二行 -->
                <el-row class="itemStyle">
                  <el-col :span="11">
                    <p>经营单位(中文)</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                  <el-col :span="1"><div>&nbsp;</div></el-col>
                  <el-col :span="11">
                    <p>单位英文名称</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                </el-row>
                <!-- 第三行 -->
                <el-row class="itemStyle">
                  <el-col :span="23">
                    <p>单位地址</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                </el-row>
                <div class="itemInfo">客户信息(*)</div>
                <!-- 第四行 -->
                <el-row class="itemStyle">
                  <el-col :span="16">
                    <p>单位名称</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                  <el-col :span="1"><div>&nbsp;</div></el-col>
                  <el-col :span="6">
                    <p>联系电话</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                </el-row>
                <!-- 第五行 -->
                <el-row class="itemStyle">
                  <el-col :span="23">
                    <p>单位地址</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                </el-row>
                <div class="itemInfo">代理报关被委托方</div>
                <!-- 第六行 -->
                <el-row class="itemStyle">
                  <el-col :span="23">
                    <p>单位名称</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                </el-row>
                <div class="itemInfo">税收</div>
                <!-- 第七行 -->
                <el-row class="itemStyle">
                  <el-col :span="23">
                    <p>税费征收</p>
                    <el-input v-model="otherInfoForm.waterNum" size="mini" clearable></el-input>
                  </el-col>
                </el-row>
              </el-form>
              <div class="otherInfoBtn">
                <el-button type="primary" size="mini">暂存</el-button>
              </div>
            </el-tab-pane>
            <el-tab-pane label="无纸化附件F3">
              <div class="noPaperTitle">
                <div class="one">NO.</div>
                <div class="two">附件类型</div>
                <div class="three">操作</div>
                <div class="four">预览</div>
                <div class="five">预览区</div>
              </div>
              <div class="noPaperBox">
                <div class="itemNoPaper" v-for="(item,index) in paperList" :key="index">
                  <div class="one">{{item.num}}.</div>
                  <div class="two">{{item.fileStyle}}</div>
                  <div class="three">{{item.opt}}</div>
                  <div class="four">
                    <el-button size="mini" plain type="info">{{item.btnText}}</el-button>
                  </div>
                  <div class="five">{{item.preArea}}</div>
                </div>
              </div>
            </el-tab-pane>
          </el-tabs>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { getSelectDown,getOrderListData,getDropDown,inputOrderService,saveService,statusService } from '@/request/api'
import paginationMixin from '@/mixins/pagination'
export default {
  name: 'router.clearancePass',
  mixins: [paginationMixin],
  data() {
    return {
      searchForm: {
        enName: '', // 英文船名
        route: '', // 航次
        waterNum: '', // 流水号
        statu: '', // 状态
        startDay: new Date((new Date()) - 7*24*3600*1000), // 开始时间
        endDay: new Date(), // 结束时间
      },
      billTableData: [], // 托单列表 表格数据
      billTableHeight: 600, // 托单列表 表格高度
      currentData: '', // 托单列表 当前行数据
      documentInfoDialog: false, // 控制单证信息弹窗展示
      LXList:[{label: '进口',value: 'I'},{label: '出口',value: 'E'}],//下拉框数据 类型
      ZMList:[],//下拉框数据 征免
      CJDWList:[],//下拉框数据 成交单位
      BZZLList:[],// 下拉框数据 包装种类
      BGDLXList:[],// 下拉框数据 报关单类型
      FBList:[],// 下拉框数据 费币
      FLList:[],// 下拉框数据 费率
      CJFSList:[],// 下拉框数据 成交方式
      MYGList:[],// 下拉框数据 贸易国
      JNHYDList:[],// 下拉框数据 境内货源地
      DYGList:[],// 下拉框数据 抵运国
      ZMXZList:[],// 下拉框数据 征免性质
      MYFSList:[],// 下拉框数据 贸易方式
      YSFSList:[],// 下拉框数据 运输方式
      statusList: [], // 下拉框数据 申报口岸
      bdcstatuList:[],// 下拉框数据 状态
      // 输单弹窗   申报口岸 表单
      portForm: {
        bdcIetype: '', // 类型
        style: '', // 申报海关
        bdcNumbers: '', // 统一编号
        bdcCode: '', // 流水号
        bdcCustomsnumber: '', // 海关编号
        bdcExportloc: '', // 出口口岸
        bdcEnrolNo: '', // 备案号
        bdcContractno: '', // 合同号
        bdcExportDate: '', // 出口日期
        bdcDeclareDate: '', // 申报日期
        bdcBuscompanyCode: '', // 经营单位
        bdcBuscompany: '', //
        bdcTransmode: '', // 运输方式
        bdcProduccompanyCode: '', // 发货单位
        bdcProduccompany: '', //
        bdcVesselname: '', // 运输工具名称
        bdcDeccompanyCode: '', // 申报单位
        bdcDeccompany: '', //
        bdcVoyage: '', // 航次号
        bdcBillno: '', // 提运单号
        bdcTradeMode: '', // 贸易方式
        bdcCutmode: '', // 征免性质
        bdcTaxcorpType: '', // 纳税单位
        bdcLicenseNo: '', // 许可证号
        bdcArrcountry: '', // 抵运国（地区）
        bdcArrport: '', // 指运港
        bdcGoodssource: '', // 境内货源地
        bdcTradcountry: '', // 贸易国
        bdcTransacmode: '', // 成交方式
        bdcFreightMarkChn: '', // 运费
        bdcFreightRate: '', //
        bdcFreightCurrencyChn: '', //
        bdcInsuranceMarkChn: '', // 保费
        bdcInsuranceRate: '', //
        bdcInsuranceCurrencyChn: '', //
        bdcExtrasMarkChn: '', // 杂费
        bdcExtrasRate: '', //
        bdcExtrasCurrencyChn: '', //
        bdcPacktype: '', // 包装种类
        bdcGoodsnumbers: '', // 件数
        bdcGoodsweight: '', // 毛重
        bdcNetWeight: '', // 净重
        bdcEntrytype: '', // 报关单类型
        bdcRemark: '', // 备注
        bdcClearance: '', // 担保验放
      },

      goodsTableData: [], // 商品  表格数据
      goodsTableHeight: 150, // 商品  表格高度
      // 商品 表单
      goodsForm: {
        goodsOrderNum1: '', // 商品序号
        goodsOrderNum2: '', //
        goodsOrderNum3: '', //
        goodsOrderNum4: '', //
        goodsOrderNum5: '', //
        goodsOrderNum6: '', //
        goodsOrderNum7: '', //
        goodsOrderNum8: '', //
        goodsOrderNum9: '', //
        goodsOrderNum10: '', //
        goodsOrderNum11: '', //
        goodsOrderNum12: '', //
        goodsOrderNum13: '', //
        goodsOrderNum14: '', //
        goodsOrderNum15: '', //
        goodsOrderNum16: '', //
        goodsOrderNum17: '中国',
        goodsOrderNum18: '', //
        goodsOrderNum19: '', //
        goodsOrderNum20: '', //
        goodsOrderNum21: '', //
        goodsOrderNum22: '', //
      },
      boxTableData: [], // 集装箱 表格数据
      boxTableHeight: 150, // 集装箱 表格高度
      // 集装箱 表单
      boxForm: {
        boxNum: '', // 集装箱号
        boxStyle: '', // 集装箱规格
        boxWeight: '', // 集装箱自重(KG)
      },
      documentTableData: [], // 单证 表格数据
      documentTableHeight: 150, // 单证 表格高度
      // 单证 表单
      documentForm: {
        documentCode: '', // 随附单证代码
        documentNum: '', // 随附单证编号
        bdcRelentryNo: '', // 关联报关单
        bdcRelenrolNo: '', // 关联备案
        bdcWarehouseNo: '', // 监管仓号
        bdcCyNo: '', // 货场代码
      },

      // 报关其他信息F2 表单
      otherInfoForm: {
        waterNum: '',
      },

      // 无纸化附件F3
      paperList: [
        {num: 1,fileStyle: '发票',opt: '',btnText: '预览',preArea: ''},
        {num: 2,fileStyle: '装箱单',opt: '',btnText: '预览',preArea: ''},
        {num: 3,fileStyle: '提运单',opt: '',btnText: '预览',preArea: ''},
        {num: 4,fileStyle: '合同',opt: '',btnText: '预览',preArea: ''},
        {num: 5,fileStyle: '其它1',opt: '',btnText: '预览',preArea: ''},
        {num: 6,fileStyle: '其它2',opt: '',btnText: '预览',preArea: ''},
        {num: 7,fileStyle: '其它3',opt: '',btnText: '预览',preArea: ''},
        {num: 8,fileStyle: '纸质代理报关委托..',opt: '',btnText: '预览',preArea: ''},
        {num: 9,fileStyle: '',opt: '',btnText: '保存',preArea: ''},
        {num: 10,fileStyle: '减免税货物税款担..',opt: '',btnText: '预览',preArea: ''},
      ]
    }
  },
  mounted() {
    this.getSelectData()
  },
  methods: {
    // 输单 保存
    inputOrderSave() {
      let needArr = Object.assign(this.portForm,this.documentForm,{bdcId: this.currentData.bdcId})
      saveService(needArr).then(res => {
        if(res.success == 1) {
          this.$message({
            type:'success',
            message: '保存成功'
          })
          this.documentInfoDialog = false
          this.getData()
        }
      })
    },
    // 获取托单列表数据
    getData() {
      let needArr = Object.assign(this.searchForm,{PageIndexs: String(this.Pagination.currentPage)},{PageSizes: String(this.Pagination.pageSize)})
      getOrderListData(needArr).then(res => {
        this.billTableData = res.data
        this.Pagination.total=res.total
      })
    },
    // 获取 托单列表 当前行数据
    getCurrent(row) {
      console.log(row)
      this.currentData = row
    },
    // 查询
    searchBtn() {
      this.getData()
    },
    // 输单
    inputOrder() {
      if(Object.keys(this.currentData).length == 0) {
        this.$alert('请选择一条数据','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  != '准备报关') {
        this.$alert('当前托单状态为:'+this.currentData.bdcStatusName+ ',不能输单','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      inputOrderService({bdcId: this.currentData.bdcId}).then(res => {
        if(res.success == 1) {
          this.portForm = res.data.bgDocument
          this.documentForm = res.data.bgDocument
        }
      })
      this.documentInfoDialog = true
    },
    // 输单审核/撤销
    successInput() {
      if(Object.keys(this.currentData).length == 0) {
        this.$alert('请选择一条数据','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  != '输单确认' && this.currentData.bdcStatusName  != '输单审核') {
        this.$alert('当前托单状态为:'+this.currentData.bdcStatusName+ ',不能输单审核','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  == '输单确认') {
        this.$confirm('确定输单审核吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          statusService({bdcId: this.currentData.bdcId,bdcStatus: 'SDSH'}).then(res => {
            if(res.success == 1 ) {
              this.$message({
                type: 'success',
                message: '修改成功!'
              })
              this.getData()
            }
          })
        }).catch(() => {
        })
      }
      if(this.currentData.bdcStatusName  == '输单审核') {
        statusService({bdcId: this.currentData.bdcId,bdcStatus: 'SDQR'}).then(res => {
          if(res.success == 1 ) {
            this.$message({
              type: 'success',
              message: '修改成功!'
            })
            this.getData()
          }
        })
      }
    },
    // 开始申报/撤销
    startCustom() {
      if(Object.keys(this.currentData).length == 0) {
        this.$alert('请选择一条数据','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  != '输单审核' && this.currentData.bdcStatusName  != '开始申报') {
        this.$alert('当前托单状态为:'+this.currentData.bdcStatusName+ ',不能开始申报','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  == '输单审核') {
        this.$confirm('确定开始申报吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          statusService({bdcId: this.currentData.bdcId,bdcStatus: 'KSSB'}).then(res => {
            if(res.success == 1 ) {
              this.$message({
                type: 'success',
                message: '修改成功!'
              })
              this.getData()
            }
          })
        }).catch(() => {
        })
      }
      if(this.currentData.bdcStatusName  == '开始申报') {
        statusService({bdcId: this.currentData.bdcId,bdcStatus: 'SDSH'}).then(res => {
          if(res.success == 1 ) {
            this.$message({
              type: 'success',
              message: '修改成功!'
            })
            this.getData()
          }
        })
      }
    },
    // 发生查验/撤销
    happenSearch() {
      if(Object.keys(this.currentData).length == 0) {
        this.$alert('请选择一条数据','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  != '开始申报' && this.currentData.bdcStatusName  != '发生查验') {
        this.$alert('当前托单状态为:'+this.currentData.bdcStatusName+ ',不能发生查验','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  == '开始申报') {
        this.$confirm('确定发生查验吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          statusService({bdcId: this.currentData.bdcId,bdcStatus: 'FSCY'}).then(res => {
            if(res.success == 1 ) {
              this.$message({
                type: 'success',
                message: '修改成功!'
              })
              this.getData()
            }
          })
        }).catch(() => {
        })
      }
      if(this.currentData.bdcStatusName  == '发生查验') {
        statusService({bdcId: this.currentData.bdcId,bdcStatus: 'KSSB'}).then(res => {
          if(res.success == 1 ) {
            this.$message({
              type: 'success',
              message: '修改成功!'
            })
            this.getData()
          }
        })
      }
    },
    // 查验完成/撤销
    successSearch() {
      if(Object.keys(this.currentData).length == 0) {
        this.$alert('请选择一条数据','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  != '发生查验' && this.currentData.bdcStatusName  != '查验完成') {
        this.$alert('当前托单状态为:'+this.currentData.bdcStatusName+ ',不能查验完成','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  == '发生查验') {
        this.$confirm('确定查验完成吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          statusService({bdcId: this.currentData.bdcId,bdcStatus: 'CYWC'}).then(res => {
            if(res.success == 1 ) {
              this.$message({
                type: 'success',
                message: '修改成功!'
              })
              this.getData()
            }
          })
        }).catch(() => {
        })
      }
      if(this.currentData.bdcStatusName  == '查验完成') {
        statusService({bdcId: this.currentData.bdcId,bdcStatus: 'FSCY'}).then(res => {
          if(res.success == 1 ) {
            this.$message({
              type: 'success',
              message: '修改成功!'
            })
            this.getData()
          }
        })
      }
    },
    // 报关完成/撤销
    successCustom() {
      if(Object.keys(this.currentData).length == 0) {
        this.$alert('请选择一条数据','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  != '查验完成'  && this.currentData.bdcStatusName  != '报关完成') {
        this.$alert('当前托单状态为:'+this.currentData.bdcStatusName+ ',不能报关完成','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  == '查验完成') {
        this.$confirm('确定报关完成吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          statusService({bdcId: this.currentData.bdcId,bdcStatus: 'BGWC'}).then(res => {
            if(res.success == 1 ) {
              this.$message({
                type: 'success',
                message: '修改成功!'
              })
              this.getData()
            }
          })
        }).catch(() => {
        })
      }
      if(this.currentData.bdcStatusName  == '报关完成') {
        statusService({bdcId: this.currentData.bdcId,bdcStatus: 'CYWC'}).then(res => {
          if(res.success == 1 ) {
            this.$message({
              type: 'success',
              message: '修改成功!'
            })
            this.getData()
          }
        })
      }
    },
    // 放行确认/撤销
    successRelease() {
      if(Object.keys(this.currentData).length == 0) {
        this.$alert('请选择一条数据','提示',{
          confirmButtonText: '确定'
        })
        return
      }
      if(this.currentData.bdcStatusName  != '报关完成') {
        this.$alert('当前托单状态为:'+this.currentData.bdcStatusName+ ',不能放行确认','提示',{
          confirmButtonText: '确定'
        })
        return
      }else {
        this.$confirm('确定放行确认吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          statusService({bdcId: this.currentData.bdcId,bdcStatus: 'FXQR'}).then(res => {
            if(res.success == 1 ) {
              this.$message({
                type: 'success',
                message: '修改成功!'
              })
              this.getData()
            }
          })
        }).catch(() => {
        })
      }
      if(this.currentData.bdcStatusName  == '放行确认') {
        statusService({bdcId: this.currentData.bdcId,bdcStatus: 'BGWC'}).then(res => {
          if(res.success == 1 ) {
            this.$message({
              type: 'success',
              message: '修改成功!'
            })
            this.getData()
          }
        })
      }
    },
    // // 生成单证
    // document() {
    //   if(Object.keys(this.currentData).length == 0) {
    //     this.$alert('请选择一条数据','提示',{
    //       confirmButtonText: '确定'
    //     })
    //     return
    //   }
    // },
    // // 上传附件
    // uploadFile() {
    //   if(Object.keys(this.currentData).length == 0) {
    //     this.$alert('请选择一条数据','提示',{
    //       confirmButtonText: '确定'
    //     })
    //     return
    //   }
    // },
    // // 下载附件
    // downFile() {
    //   if(Object.keys(this.currentData).length == 0) {
    //     this.$alert('请选择一条数据','提示',{
    //       confirmButtonText: '确定'
    //     })
    //     return
    //   }
    // },
    // 获取下拉框数据
    getSelectData() {
      getSelectDown({rvDomain: 'BGGL'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.bdcstatuList = res.data.FTKJWLHYPT
        }
      })
      //出口口岸，申报海关口岸
      getDropDown({rvDomain: 'CUST'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.statusList = res.data.FTKJWLHYPT
        }
      })
      //运输方式下拉框
      getDropDown({rvDomain: 'TRAF'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.YSFSList = res.data.FTKJWLHYPT
        }
      })
      //贸易方式下拉框
      getDropDown({rvDomain: 'TRADE'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.MYFSList = res.data.FTKJWLHYPT
        }
      })
      //征免性质下拉框
      getDropDown({rvDomain: 'CUT'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.ZMXZList = res.data.FTKJWLHYPT
        }
      })
      //抵运国下拉框，贸易国,目的地，原产国
      getDropDown({rvDomain: 'COUNTRY'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.DYGList = res.data.FTKJWLHYPT
        }
      })
      //境内货源地下拉框
      getDropDown({rvDomain: 'DIST'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.JNHYDList = res.data.FTKJWLHYPT
        }
      })
      //成交方式下拉框
      getDropDown({rvDomain: 'TRANS'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.CJFSList = res.data.FTKJWLHYPT
        }
      })
      //费率下拉框
      getDropDown({rvDomain: 'FMARK'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.FLList = res.data.FTKJWLHYPT
        }
      })
      //费币下拉框,币制
      getDropDown({rvDomain: 'CURR'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.FBList = res.data.FTKJWLHYPT
        }
      })
      //费币下拉框
      getDropDown({rvDomain: 'WARP'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.BZZLList = res.data.FTKJWLHYPT
        }
      })
      //报关单类型下拉框
      getDropDown({rvDomain: 'ETYPE'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.BGDLXList = res.data.FTKJWLHYPT
        }
      })
      //成交单位下拉框
      getDropDown({rvDomain: 'UNIT'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.CJDWList = res.data.FTKJWLHYPT
        }
      })
      //征免下拉框
      getDropDown({rvDomain: 'DUTY'}).then(res => {
        console.log(res)
        if(res.success == 1) {
          this.ZMList = res.data.FTKJWLHYPT
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.customServe {
  .topSearchBox {
    padding: 10px 0 0 10px;
  }
  .tableBox {
    .tableTitle {
      font-size: 14px;
      font-weight: bold;
      padding-left: 15px;
    }
    .btnBox {
      margin: 20px 0;
      padding-left: 15px;
    }
    .block {
      margin-top: 10px;
    }
  }
}
// 弹窗样式
.documentInfoBox {
  .documentTop {
    .infoF1Title {
      color: red;
    }
    .infoForm {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: space-between;
      .infoFormLeft {
        width: 69%;
        height: 100%;
        .portBtn {
          margin-bottom: 10px;
        }
        .goodsFormBox {
          padding-top: 10px;
          ::v-deep .el-input__inner {
            width: 132px;
          }
          .secondWidth {
            ::v-deep .el-input__inner{
              width: 200%;
            }
          }
        }
        .saveBtnBox {
          text-align: center;
        }
      }
      .infoFormRight {
        width: 30%;
        height: 100%;
        .rightDelBtnBox {
          margin-bottom: 10px;
        }
        .boxFormBox {
          padding-top: 20px;
        }
        .documentFormBox {
          margin-top: 20px;
        }
      }
    }
  }
}
.el-date-editor.el-input, .el-date-editor.el-input__inner {
  width: 193px;
}
::v-deep .thirdChange .el-input__inner{
  width: 115px;
}
.centerP {
  margin-bottom: 5px;
  p {
    width: 100%;
    text-align: center;
    font-weight: bold;
  }
}
.itemInfo {
  height: 50px;
  line-height: 50px;
  font-size: 16px;
}
.itemStyle {
  margin-bottom: 5px;
  p {
    font-weight: bold;
  }
}
.otherInfoBtn {
  margin-top: 20px;
  text-align: center;
}
.noPaperTitle {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.one {
    width: 5%;
    height: 50px;
    line-height: 50px;
    text-align: center;
  }
  .two {
    width: 10%;
    height: 50px;
    text-align: center;
    line-height: 50px;
  }
  .three {
    width: 15%;
    height: 50px;
    line-height: 50px;
    text-align: center;
  }
  .four {
    width: 20%;
    height: 50px;
    line-height: 50px;
    text-align: center;
  }
  .five {
    width: 50%;
    height: 50px;
    line-height: 50px;
    text-align: center;
  }
.noPaperBox {
  .itemNoPaper {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
}

</style>

